package com.example.demo.equipment.mapper;

import com.example.demo.equipment.dao.CollectingDevice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CollectingDeviceMapper {

    List<CollectingDevice> getList(@Param("start") Integer start, @Param("pageSize")Integer pageSize, @Param("name")String name);

    Integer getListCount(@Param("name")String name);

    List<CollectingDevice> getBindList(List<Integer> ids);

    //根据空间id获取设备集合
    List<CollectingDevice> getDeviceList(Integer spaceId);

    CollectingDevice get(Integer id);

    void add(CollectingDevice collectingDevice);

    void update(CollectingDevice collectingDevice);

    void delete(Integer id);

    //将绑定id清空
    void updateSpaceBind(Integer spaceId);

    //根据空间名称查询设备id集合
    List<Integer> getDeviceIds(String spaceName);
}
